import request from '@/utils/request'

// 查询配料列表
export function listAccessory(query) {
  return request({
    url: '/system/accessory/list',
    method: 'get',
    params: query
  })
}

// 查询配料详细
export function getAccessory(accessoryId) {
  return request({
    url: '/system/accessory/' + accessoryId,
    method: 'get'
  })
}

// 新增配料
export function addAccessory(data) {
  return request({
    url: '/system/accessory',
    method: 'post',
    data: data
  })
}

// 修改配料
export function updateAccessory(data) {
  return request({
    url: '/system/accessory',
    method: 'put',
    data: data
  })
}

// 删除配料
export function delAccessory(accessoryId) {
  return request({
    url: '/system/accessory/' + accessoryId,
    method: 'delete'
  })
}
